package cn.itcast.nems.journal.enumeration;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 优惠凭单状态
 *
 * @author 高昌露
 * @since 2023/12/5 18:22
 */
@Getter
@AllArgsConstructor
public enum JournalDiscountLineState {

    PENDING("待审批"),
    WAITING("待核销"),
    WRITE_OFF("已核销")
    ;

    private final String desc;

    /**
     * 判断当前行关联的优惠单是否可以可以核销
     *
     * @param state 凭单行状态
     * @return boolean 是否可以核销
     * @author 高昌露
     * @since 2023/12/09 14:49
     */
    public static boolean canWriteOff(String state) {
        return WAITING.name().equals(state);
    }

}
